package com.yiyuan.app.entity.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum RoomRankEnum {
    default_rank(0, "默认排序"),
    free_topping(1, "空闲置顶");

    private Integer code;

    private String desc;

    RoomRankEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static RoomRankEnum getByCode(Integer code) {
        for (RoomRankEnum enums : RoomRankEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
